package com.yanqu.road.entity.log.foxcard;

import com.yanqu.road.entity.FieldTypeAnnotation;
import com.yanqu.road.entity.log.ServerBaseLog;
import com.yanqu.road.entity.log.maidian.BaseLogEntity;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@FieldTypeAnnotation(tableName = "t_l_ck_activity_foxcard_lottery_settle", desc = "狐妖苦情树抽卡结算", autoSave = true, dataUpload = true, eventName = "red_drawend", uploadCk = true)
public class LogFoxCardLotterySettle extends ServerBaseLog {

    @FieldTypeAnnotation(desc = "活动ID", isIndex = true, dataAttribute = "activityid")
    private int activityId;
    @FieldTypeAnnotation(desc = "玩家ID", isIndex = true)
    private long userId;
    @FieldTypeAnnotation(desc = "轮次", dataAttribute = "red_round")
    private int lotteryRound;
    @FieldTypeAnnotation(desc = "当前总点数", dataAttribute = "red_drawendpoi")
    private int totalPoint;
    @FieldTypeAnnotation(desc = "获得的牌id", saveJson = true, dataAttribute = "red_drawendresult")
    private List<Integer> cardIds = new ArrayList<>();
    @FieldTypeAnnotation(desc = "获得的积分", dataAttribute = "red_drawgetsco")
    private int addScore;
    @FieldTypeAnnotation(desc = "当前积分", dataAttribute = "red_drawnowsco")
    private int totalScore;
    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogFoxCardLotterySettle(int activityId, long userId, int lotteryRound, int totalPoint, List<Integer> cardIds, int addScore, int totalScore) {
        this.activityId = activityId;
        this.userId = userId;
        this.lotteryRound = lotteryRound;
        this.totalPoint = totalPoint;
        this.cardIds = cardIds;
        this.addScore = addScore;
        this.totalScore = totalScore;
        this.logTime = new Date();
    }

    @Override
    public long getUserId() {
        return userId;
    }
}
